import Vue from 'vue'
import ElementUI from 'element-ui'
import router from './router'
import api from './http'
import App from './App'
import store from './store'
import moment from 'moment'

import 'element-ui/lib/theme-chalk/index.css'


Vue.use(api)
Vue.use(ElementUI)
Vue.prototype.$moment = moment 

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
});
/*
window.addEventListener('popstate', () => {
  history.pushState(null, null, document.URL);
});
*/
window.addEventListener('resize', function() {
  var tbs = document.getElementsByTagName('table');
  for (let i = 0; i < tbs.length; i++) {
    tbs[i].style = 'none';
  }
});